//
//  YTOrderFlowViewCell.m
//  YiTuDriverClient
//
//  Created by 石少庸 on 2017/8/16.
//  Copyright © 2017年 Yitu. All rights reserved.
//

#import "YTOrderFlowViewCell.h"
#import "YTOrderFlowModel.h"

@interface YTOrderFlowViewCell ()
@property (weak, nonatomic) IBOutlet UILabel *content;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@property (weak, nonatomic) IBOutlet UIView *dotView;
@property (weak, nonatomic) IBOutlet UIView *bottomLine;
@property (weak, nonatomic) IBOutlet UIView *topLine;
@property (weak, nonatomic) IBOutlet UIImageView *firstFlowImage;
@end

@implementation YTOrderFlowViewCell

- (void)configModel:(YTOrderFlowModel *)model
          indexPath:(NSIndexPath *)indexPath
         isLastLine:(BOOL)isLastLine {
    if (indexPath.row == 0) {
        _firstFlowImage.hidden = NO;
        _topLine.hidden = YES;
        _content.textColor = kMainBlueColor;
    }
    
    if (isLastLine) {
        _bottomLine.hidden = YES;
    }
    
    _timeLabel.text = model.time;
    _content.text = model.msg;
}

- (void)prepareForReuse {
    [super prepareForReuse];
    _firstFlowImage.hidden = YES;
    _content.textColor = kBlackColor;
    _topLine.hidden = NO;
    _bottomLine.hidden = NO;
    _timeLabel.text = nil;
    _content.text = nil;
}

@end
